<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/9/18
 * Time: 15:54
 */
$names1 = array('andy', 'tom', 'jack', 'joe');
$names2 = array('lucy', 'tom', 'judy','joe');

$arr = array_diff($names2,$names1);
var_dump($arr);